<template>
  <div>
    <Header></Header>
    <!-- Home是一个路由，默认路由 -->
    <router-view></router-view> 
    <!-- "$route.path=='/home' || $route.path='/search'" -->
    <!-- "$route.path=='/home' || $route.path=='/search'" -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from './components/Header'
import Footer from './components/Footer'
export default {
  name: '',
  components: {
    Header,
    Footer,
  },
  //派发一个action，获取商品分类的三级列表的数据
  mounted(){
    this.$store.dispatch('getCategoryList')
  }
}
</script>

<style lang="less" scope></style>
